package com.example.blog.model;

import com.example.blog.utils.DateUtils;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.springframework.transaction.annotation.Transactional;

import java.util.Date;
@Data
public class BlogInfo {
    private Integer id;
    private String title;
    private String content;
    private Integer userId;
    private Integer deleteFlag;

    //当前作者是否是登录用户
    private boolean loginUser;


    private Date createTime;

   //@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    private Date updateTime;

    public String getUpdateTime() {
        return DateUtils.format(updateTime);
    }
}
